package com.link2room.soundwave.entity;

import com.link2room.common.entity.BaseEntity;
import org.hibernate.annotations.DynamicInsert;

import javax.persistence.Basic;
import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Table;

/**
 * @author sqj88
 * @date 2017/10/20 19:48
 */
@Entity
@Table(name = "l2r_yh_reservation")
@DynamicInsert
public class L2RYhReservation extends BaseEntity{
    public enum L2RYhReservation_{
        pmsSta
    }
    private String groupCode;
    private String hotelCode;
    private String hotelName;
    private String l2RNo;
    private String crsNo;
    private String pmsSta;
    private String memberNo;
    private String rsvMan;
    private String openId;
    private String resType;
    private String commissionSta;

    @Basic
    @Column(name = "group_code", nullable = false, length = 20)
    public String getGroupCode() {
        return groupCode;
    }

    public void setGroupCode(String groupCode) {
        this.groupCode = groupCode;
    }

    @Basic
    @Column(name = "hotel_code", nullable = false, length = 20)
    public String getHotelCode() {
        return hotelCode;
    }

    public void setHotelCode(String hotelCode) {
        this.hotelCode = hotelCode;
    }

    @Basic
    @Column(name = "hotel_name", nullable = true, length = 60)
    public String getHotelName() {
        return hotelName;
    }

    public void setHotelName(String hotelName) {
        this.hotelName = hotelName;
    }

    @Basic
    @Column(name = "l2r_no", nullable = true, length = 32)
    public String getL2RNo() {
        return l2RNo;
    }

    public void setL2RNo(String l2RNo) {
        this.l2RNo = l2RNo;
    }

    @Basic
    @Column(name = "crs_no", nullable = true, length = 32)
    public String getCrsNo() {
        return crsNo;
    }

    public void setCrsNo(String crsNo) {
        this.crsNo = crsNo;
    }

    @Basic
    @Column(name = "pms_sta", nullable = true, length = 16)
    public String getPmsSta() {
        return pmsSta;
    }

    public void setPmsSta(String pmsSta) {
        this.pmsSta = pmsSta;
    }

    @Basic
    @Column(name = "member_no", nullable = true, length = 16)
    public String getMemberNo() {
        return memberNo;
    }

    public void setMemberNo(String memberNo) {
        this.memberNo = memberNo;
    }

    @Basic
    @Column(name = "rsv_man", nullable = true, length = 60)
    public String getRsvMan() {
        return rsvMan;
    }

    public void setRsvMan(String rsvMan) {
        this.rsvMan = rsvMan;
    }

    @Basic
    @Column(name = "open_id", nullable = true, length = 32)
    public String getOpenId() {
        return openId;
    }

    public void setOpenId(String openId) {
        this.openId = openId;
    }

    @Basic
    @Column(name = "res_type", nullable = true, length = 16)
    public String getResType() {
        return resType;
    }

    public void setResType(String resType) {
        this.resType = resType;
    }

    @Basic
    @Column(name = "commission_sta", nullable = true, length = 16)
    public String getCommissionSta() {
        return commissionSta;
    }

    public void setCommissionSta(String commissionSta) {
        this.commissionSta = commissionSta;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        L2RYhReservation that = (L2RYhReservation) o;

        if (groupCode != null ? !groupCode.equals(that.groupCode) : that.groupCode != null) return false;
        if (hotelCode != null ? !hotelCode.equals(that.hotelCode) : that.hotelCode != null) return false;
        if (hotelName != null ? !hotelName.equals(that.hotelName) : that.hotelName != null) return false;
        if (l2RNo != null ? !l2RNo.equals(that.l2RNo) : that.l2RNo != null) return false;
        if (crsNo != null ? !crsNo.equals(that.crsNo) : that.crsNo != null) return false;
        if (pmsSta != null ? !pmsSta.equals(that.pmsSta) : that.pmsSta != null) return false;
        if (memberNo != null ? !memberNo.equals(that.memberNo) : that.memberNo != null) return false;
        if (rsvMan != null ? !rsvMan.equals(that.rsvMan) : that.rsvMan != null) return false;
        if (openId != null ? !openId.equals(that.openId) : that.openId != null) return false;
        if (resType != null ? !resType.equals(that.resType) : that.resType != null) return false;
        if (commissionSta != null ? !commissionSta.equals(that.commissionSta) : that.commissionSta != null)
            return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = groupCode != null ? groupCode.hashCode() : 0;
        result = 31 * result + (hotelCode != null ? hotelCode.hashCode() : 0);
        result = 31 * result + (hotelName != null ? hotelName.hashCode() : 0);
        result = 31 * result + (l2RNo != null ? l2RNo.hashCode() : 0);
        result = 31 * result + (crsNo != null ? crsNo.hashCode() : 0);
        result = 31 * result + (pmsSta != null ? pmsSta.hashCode() : 0);
        result = 31 * result + (memberNo != null ? memberNo.hashCode() : 0);
        result = 31 * result + (rsvMan != null ? rsvMan.hashCode() : 0);
        result = 31 * result + (openId != null ? openId.hashCode() : 0);
        result = 31 * result + (resType != null ? resType.hashCode() : 0);
        result = 31 * result + (commissionSta != null ? commissionSta.hashCode() : 0);
        return result;
    }
}
